package com.asiainfo.dao;

import org.apache.ibatis.session.TransactionIsolationLevel;
import org.apache.ibatis.transaction.Transaction;
import org.apache.ibatis.transaction.TransactionFactory;

import javax.sql.DataSource;
import java.sql.Connection;
import java.util.Properties;

public class MyJdbcTransactionFactory implements TransactionFactory {
	
	public void setProperties(Properties props) {
		
	}

	public Transaction newTransaction(Connection conn) {
		return new MyJdbcTransaction(conn);
	}

	public Transaction newTransaction(DataSource ds, TransactionIsolationLevel level, boolean autoCommit) {
		return new MyJdbcTransaction(ds, level, autoCommit);
	}
	
}